﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BPM.Entity;
using System.Web.Mvc;
using System.Web;

namespace BPM.Web
{
    public interface IControllerUserStrategy
    {
		User GetCurrentUser(HttpContextBase context);
		void SetCurrentUser(HttpContextBase context, User value);
    }

    public static class DPHost
    {
        public static IControllerUserStrategy Context;
    }

    public class ControllerUserStrategy_HttpSession : IControllerUserStrategy
    {
		public User GetCurrentUser(HttpContextBase context)
        {
			return context.Session["User"] as User;
        }

		public void SetCurrentUser(HttpContextBase context, User value)
        {
			context.Session["User"] = value;
        }
    }
}
